BIN_NAME=httpd_npcepy
OUTPUT_DIR:= bin
SRC:= src

all : build

run : clean
	@if [ ! -d 'log' ];then mkdir log >>/dev/null; else rm log/* >>/dev/null; fi

	python -W ignore src/main.py 7645 

clean :
	@rm -rf ./src/*.pyc >>/dev/null
	@rm -rf  ./*.spec >>/dev/null
	@rm -rf ${OUTPUT_DIR}/*  >>/dev/null

build : clean
	pyinstaller --clean  -F ${SRC}/*.py  \
		--distpat ${OUTPUT_DIR} \
		--workpath ${OUTPUT_DIR}/obj \
		--name ${BIN_NAME} \

.PHONY : clean run build


